package cn.wolfcode.crm5.service.impl;

import cn.wolfcode.crm5.domain.Employee;
import cn.wolfcode.crm5.mapper.EmployeeMapper;
import cn.wolfcode.crm5.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements IEmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public void save(Employee employee) {
        employeeMapper.save(employee);
    }

    @Override
    public void delete(Long id) {
        employeeMapper.delete(id);
    }

    @Override
    public void update(Employee employee) {
        employeeMapper.update(employee);
    }

    @Override
    public Employee get(Long id) {
        return employeeMapper.get(id);
    }

    @Override
    public List<Employee> list() {
        return employeeMapper.list();
    }
}
